package com.nbsaas.boot.express.data.entity;


import com.nbsaas.boot.code.annotation.*;
import com.nbsaas.boot.code.annotation.bean.StoreStateBean;
import com.nbsaas.boot.code.annotation.data.Dict;
import com.nbsaas.boot.code.annotation.data.DictItem;
import com.nbsaas.boot.jpa.data.entity.LongEntity;
import com.nbsaas.boot.rest.filter.Operator;
import lombok.Data;
import org.hibernate.annotations.Comment;

import javax.persistence.Entity;
import javax.persistence.Table;

@ComposeView
@StoreStateBean
@Data
@FormAnnotation(title = "快递公司", model = "快递公司")
@Entity
@Table(name = "bs_express")
@org.hibernate.annotations.Table(appliesTo = "bs_express", comment = "快递公司")
public class Express extends LongEntity {


    @FormField(title = "图标", type = InputType.image)
    @Comment("图标")
    private String icon;

    @FormField(title = "快递公司", grid = true, required = true)
    @SearchItem(label = "快递公司", name = "name", operator = Operator.like)
    @Comment("快递公司")
    private String name;

    @FormField(title = "公司官网",grid = true)
    @Comment("公司官网")
    private String url;


    //电话
    @FormField(title = "电话", grid = true)
    @Comment("电话")
    private String tel;

    @FormField(title = "快递编码", grid = true)
    @Comment("快递编码")
    private String code;




    @Dict(items = {
            @DictItem(value = 1, label = "启用")
            , @DictItem(value = 2, label = "禁用")
    })
    @Comment("是否启用")
    private Integer enabled;

    @Comment("排序")
    private Integer sortNum;

    @FormField(title = "备注")
    @Comment("备注")
    private String note;

    @FormField(title = "快递公司简介",type = InputType.richText)
    @Comment("快递公司简介")
    private String intro;




}
